package cn.dao.impl;

import cn.dao.BaseDao;
import cn.dao.StreetDao;
import cn.entity.Street;

public class StreetDaoImpl extends BaseDao implements StreetDao {
    @Override
    public void save(Street street) {

        currentSession().save(street);

    }

    @Override
    public Street load(long id) {
        return (Street) currentSession().load(Street.class,id);
    }

    @Override
    public void delete(Street street) {
        currentSession().delete(this.load(street.getId()));
    }

}
